package com.my.study.designPatterns.abstractFactoryPattern;

/**
 * 实现抽象工厂
 */
public class NYIngredientFactory implements IngredientFactory{

    @Override
    public Dough createDough() {
        System.out.println("NYIngredient dough");
        return new NYDough();
    }

    @Override
    public Sauce createSauce() {
        System.out.println("NYIngredient sauce");
        return new NYSauce();
    }

    @Override
    public Vegetable [] createVegetables() {

        Vegetable [] vegetables = {new Potato()};
        System.out.println("NYVegetables size: " + vegetables.length);
        return vegetables;
    }
}
